<extend name="./app/Tpl/Public/template.html" />
<block name="content_body">
	<div class="pad-lr-10">
		<form name="form_search" id="form_search" action="{:U('index')}" method="post">
			<input type="hidden" name="order_status" value="{$search.order_status}">
		    <table width="100%" cellspacing="0" class="search-form">
		        <tbody>
		            <tr>
			            <td>
				            <div class="explain-col">							
								<input type="text" name="order_code" value="{$search.order_code}" placeholder="订单号">
								<input type="text" name="cust_mobile" value="{$search.cust_mobile}" placeholder="客户联系方式">

								<input type="button"  name="form_search_btn_search"  value="查询" onclick="document.forms['form_search'].submit()"/>	
				        	</div>
			            </td>
		            </tr>
		        </tbody>
		    </table>
	    </form>
	    <form  name="form_list" id="form_list" action="{:U('index')}" method="post">
		    <div class="table-list">		
			    <table width="100%" cellspacing="0">
			        <thead>
			            <tr>
			            	<th width="50" align="center">订单号</th> 
			            	<th width="200" align="center">客户，联系方式</th>  
			            	<th width="250" align="left">配送地址</th> 
			            	<th width="120" align="left">收货时间</th>               
			                <th width="80" align="left">订单金额</th>
			                <th width="80" align="left">配送费</th>
			                <th width="80" align="left">下单时间</th>
			      			<th align="left">操作</th>
			            </tr>
			        </thead>
			    	<tbody>
						<volist name="list" id='val'>
				        <tr>
				        	<td align="center">{$val.order_code}</td>
				            <td align="left">{$val.cust_name},{$val.cust_mobile}</td>
				            <td align="left">{$val.cust_address}</td>
				            <td align="left">{$val.cust_free_time}</td>
				            <td align="left">¥{$val.order_amt}</td>
				            <td align="left">
				            	<if condition="$val['order_send_fee'] eq 0">
				            		免运费
				            	<else/>
				            		¥{$val.order_send_fee}
				            	</if>
				            	
				            </td>
				            <td align="left">{$val.cust_order_time|date="H:i:s",###}</td>
				            <td align="left" class="btn">
				            	<a class="link_btn" href="{:U('showDetail',array('order_code'=>$val['order_code']))}" target="_blank" >详情</a>
				            </td>
				        </tr>
				        </volist>
			    	</tbody>
			    </table>
	
			    <div class="btn">
					<input type="button"  name="form_list_btn_ckAll" class="ckSelect" ck_type="all" ck_name="id[]" value="全选" />
					<input type="button"  name="form_list_btn_ckNone" class="ckSelect" ck_type="none"  ck_name="id[]" value="全不选" />
					<input type="button"  name="form_list_btn_ckReverse" class="ckSelect" ck_type="reverse" ck_name="id[]" value="反选"/>
					<input type="button"  name="form_list_btn_ckDel" value="删除选中项" onclick="doDel('{:U('doDel')}')"/>
					<div id="pages">{$page}</div>
			    </div>
	    	</div>
	    </form>
	</div>
	<div id="dialog_content" title="弹出框"></div>
<script type="text/javascript">

function doAdd(action_url){
	var cate_code = document.forms['form_search'].elements['cate_code'].value;
	var url = action_url+"?cate_code="+cate_code
	redirect(url);
}

function doUpd(action_url,type){
	var url = action_url
	if(type == 'cate'){
		var cate_code = document.forms['form_search'].elements['cate_code'].value;
		if(cate_code==''){
			alert('请选择分类');
			return;
		}
		url = url+"?cate_code="+cate_code;
	}
	redirect(url);
}

//删除操作
function doDel(action_url){
	if(confirm("确定删除选中项（如果选中项下有子菜单，会一同被删除）？")){
		$("#form_list").attr('action',action_url);
		$("#form_list").submit();
	}
	
}

//刷新菜单缓存文件
function removeCache(){
	$.get("{:U('removeCache')}", { }, function(jsondata){ 
		alert(jsondata);
	},'json'); 
}
</script>
</block>